home *** CD-ROM | disk | FTP | other *** search
- // This is a part of the Microsoft Foundation Classes C++ library.
- // Copyright (C) 1992-1998 Microsoft Corporation
- // All rights reserved.
- //
- // This source code is only intended as a supplement to the
- // Microsoft Foundation Classes Reference and related
- // electronic documentation provided with the library.
- // See these sources for detailed information regarding the
- // Microsoft Foundation Classes product.
-
- #ifndef __WCEALT_H__
- #define __WCEALT_H__
-
- #if !defined(_WIN32_WCE_NO_WININET)
- #include <wininet.h>
- #endif
-
- // The WinCE OS headers #defines the following,
- // but it interferes with MFC member functions.
- #undef TrackPopupMenu
- #undef DrawIcon
- #undef SendDlgItemMessage
- #undef SetDlgItemText
- #undef GetDlgItemText
- #undef LoadCursor
-
- // ATLCONV.H support
- #ifndef _ASSERTE
- #define _ASSERTE ASSERT
- #endif
-
- #define wce_T2CA(lpszSrc) \
- (lpszSrc ? wce_T2CAHelper((LPSTR)_alloca((_tcslen(lpszSrc)+1)*2), lpszSrc) : NULL)
-
- #if defined(_WIN32_WCE_PSPC)
- #ifndef _DEBUG
- #define USES_CONVERSION int _convert; _convert
- #else
- #define USES_CONVERSION int _convert = 0;
- #endif
- #define A2CT(lpa) (\
- ((LPCSTR)lpa == NULL) ? NULL : (\
- _convert = (lstrlenA(lpa)+1),\
- (LPCWSTR)AfxA2WHelper((LPWSTR) alloca(_convert*2), lpa, _convert)\
- )\
- )
-
- #ifndef OFN_READONLY
- #define OFN_READONLY 0
- #endif
- #endif // _WIN32_WCE_PSPC
-
- typedef struct tagHELPINFO
- {
- } HELPINFO;
- typedef void* LPHELPINFO;
-
- // WinCE: CESYSGEN prunes the following FRP defines,
- // and INTERNET_TRANSFER_TYPE_ASCII breaks in wininet.h
- #undef FTP_TRANSFER_TYPE_ASCII
- #define FTP_TRANSFER_TYPE_ASCII 0x00000001
- #undef FTP_TRANSFER_TYPE_BINARY
- #define FTP_TRANSFER_TYPE_BINARY 0x00000002
-
- #define MM_TEXT 1
- typedef DWORD OLE_COLOR;
- #define WS_OVERLAPPEDWINDOW 0
-
- #ifndef MF_BITMAP
- #define MF_BITMAP 0x00000004L
- #endif
-
- #ifndef WS_EX_CAPTIONOKBTN
- #define WS_EX_CAPTIONOKBTN 0x80000000L
- #endif
-
- #ifndef WS_EX_NODRAG
- #define WS_EX_NODRAG 0x40000000L
- #endif
-
- // Forward declarations
- class CWnd;
- class CFrameWnd;
- struct CCreateContext;
- class CPropertySheet;
-
- // WCEALT.CPP
- BOOL wce_SystemParametersInfo(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni);
- FARPROC wce_GetProcAddress(HMODULE hModule, LPCSTR lpProcName);
- HMODULE wce_LoadLibraryA(LPCSTR lpLibFileName);
- BOOL wce_WinHelp(HWND hWndMain, LPCTSTR lpszHelp, UINT uCommand, DWORD dwData);
- wchar_t* wce_AsciiToWide(wchar_t* ws, const char* s);
- wchar_t* wce_AsciiToWide(const char* s);
- PSTR wce_T2CAHelper(LPSTR lpszDest, LPCTSTR lpszSrc);
- BOOL wce_CheckEmulationLibs(HINSTANCE hInstance);
- int wce_GetClipboardFormatNameA(UINT format, LPSTR lpszFormatName, int cchMaxCount);
- void wce_WaitMessage();
- int wce_wsprintfA(LPSTR szBuf, LPCSTR szFormat, UINT nArg);
- BOOL wce_IsBadStringPtrA(LPCSTR lpsz, UINT ucchMax);
- BOOL wce_IsBadStringPtrW(LPCWSTR lpsz, UINT ucchMax);
- void wce_ReportDebugBreak(TCHAR *szFile, int nLine);
- HPEN wce_CreatePen(int nPenStyle, int nWidth, COLORREF crColor);
- HBRUSH wce_CreateBrushIndirect(const LOGBRUSH* lplb);
- HFONT wce_CreateFont(int nHeight, int nWidth, int nEscapement, int nOrientation, int nWeight, BYTE bItalic, BYTE bUnderline, BYTE cStrikeOut, BYTE nCharSet, BYTE nOutPrecision, BYTE nClipPrecision, BYTE nQuality, BYTE nPitchAndFamily, LPCTSTR lpszFacename);
- HRGN wce_CreateRectRgn(int x1, int y1, int x2, int y2);
- BOOL wce_SetRectRgn(HRGN hrgn, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect);
- BOOL wce_GetBrushOrgEx(HDC hdc, LPPOINT lppt);
- int wce_OffsetClipRgn(HDC hdc, int nXOffset, int nYOffset);
- int wce_ExtSelectClipRgn(HDC hdc, HRGN hrgn, int fnMode);
- int wce_ExcludeUpdateRgn(HDC hDC, HWND hWnd);
- BOOL wce_PolyPolyline(HDC hdc, const POINT* lppt, const DWORD* lpdwPolyPoints, DWORD cCount);
- BOOL wce_PolyPolygon(HDC hdc, const POINT* lpPoints, const int* lpPolyCounts, int nCount);
- int wce_FrameRect(HDC hdc, const RECT* lprc, HBRUSH hbr);
- UINT wce_GetSystemDirectory(LPWSTR lpBuffer, UINT uSize);
- UINT wce_GetSystemDirectoryA(LPSTR lpBuffer, UINT uSize);
- TCHAR* wce_GetNextArg(TCHAR* pszArgList, TCHAR szArg[]);
- int wce_GetArgCount(TCHAR* pszArgList);
- BOOL wce_ArgvW(int argc, char* argv[]);
- DWORD wce_GetObjectStoreFreeSpace();
- UINT wce_GetTempFileName(LPCTSTR lpPathName, LPCTSTR lpPrefixString, UINT uUnique, LPTSTR lpTempFileName);
- DWORD wce_GetFullPathName(LPCTSTR lpFileName, DWORD nBufferLength, LPTSTR lpBuffer, LPTSTR *lpFilePart);
- short wce_GetFileTitleW(LPCTSTR lpszFile, LPTSTR lpszTitle, WORD cbBuf);
- HMENU wce_GetMenu(HWND hWnd);
- BOOL wce_SetMenu(HWND hWnd, HMENU hMenu);
- UINT wce_GetMenuItemID(HMENU hMenu, int nPos);
- BOOL wce_ModifyMenu(HMENU hMnu, UINT uPosition, UINT uFlags, UINT uIDNewItem, LPCTSTR lpNewItem);
- int wce_GetMenuItemCount(HMENU hMenu);
- int wce_GetMenuString(HMENU hMenu, UINT uIDItem, LPWSTR lpString, int nMaxCount, UINT uFlag);
- UINT wce_GetMenuState(HMENU hMenu, UINT uId, UINT uFlags);
- BOOL wce_InvalidateRgn(HWND hWnd, HRGN hRgn, BOOL bErase);
- BOOL wce_PreCreateWindow(CREATESTRUCT& cs);
- void wce_PostCreateWindow(CREATESTRUCT& cs, HWND hWnd, HMENU nIDorHMenu);
- int wce_GetScrollPos(HWND hWnd, int nBar);
- BOOL wce_GetScrollRange(HWND hWnd, int nBar, LPINT lpMinPos, LPINT lpMaxPos);
- void wce_ScrollChildren(HWND hWnd, int cx, int cy);
- BOOL wce_ShowScrollBar(HWND hWnd, int nBar, BOOL bShow);
- BOOL wce_EnumChildWindows(HWND hWndParent, WNDENUMPROC lpEnumFunc, LPARAM lParam);
- int wce_GetSystemMetrics(int nIndex);
- BOOL wce_RedrawWindow(HWND hWnd, CONST RECT *prcUpdate, HRGN hrgnUpdate, UINT afuRedraw);
- void wce_AdjustPropertySheetSize(CPropertySheet *pSheet);
- BOOL CALLBACK wce_FirstDlgProc(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam);
- LRESULT CALLBACK wce_NullWndProc(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam);
- LRESULT CALLBACK wce_FirstDefWindowProc(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam);
- BOOL wce_WriteProfileStringW(LPCWSTR lpAppName, LPCWSTR lpKeyName, LPCWSTR lpString);
- DWORD wce_GetProfileStringW(LPCWSTR lpAppName, LPCWSTR lpKeyName, LPCWSTR lpDefault, LPWSTR lpReturnedString, DWORD nSize);
- LONG wce_RegQueryValue(HKEY hKey, LPCWSTR lpSubKey, LPWSTR lpValue, PLONG lpcbValue);
- LONG wce_RegOpenKey(HKEY hKey, LPCTSTR lpSubKey, PHKEY phkResult);
- LONG wce_RegSetValue(HKEY hKey, LPCWSTR lpSubKey, DWORD dwType, LPCWSTR lpData, DWORD cbData);
- LONG wce_RegCreateKey(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult);
- LONG wce_RegEnumKey(HKEY hKey, DWORD dwIndex, LPTSTR lpName, DWORD cbName);
- LONG wce_RegQueryValue(HKEY hKey, LPCWSTR lpSubKey, LPWSTR lpValue, PLONG lpcbValue);
- #if !defined(_WIN32_WCE_NO_WININET)
- BOOL wce_InternetSetOptionEx(HINTERNET hInternet, DWORD dwOption, LPVOID lpBuffer, DWORD dwBufferLength, DWORD);
- #endif // _WIN32_WCE_NO_WININET
-
-
- // WCETIME.CPP
- #ifndef _TM_DEFINED
- #define _TM_DEFINED
- struct tm {
- int tm_sec; /* seconds after the minute - [0,59] */
- int tm_min; /* minutes after the hour - [0,59] */
- int tm_hour; /* hours since midnight - [0,23] */
- int tm_mday; /* day of the month - [1,31] */
- int tm_mon; /* months since January - [0,11] */
- int tm_year; /* years since 1900 */
- int tm_wday; /* days since Sunday - [0,6] */
- int tm_yday; /* days since January 1 - [0,365] */
- int tm_isdst; /* daylight savings time flag */
- };
- #endif // _TM_DEFINED
- long wce_GetMessageTime();
- time_t wce_mktime(struct tm* );
- struct tm * wce_localtime(const time_t *);
- char* wce_ctime(const time_t* );
- time_t wce_time(time_t *);
-
- // WCEFRDLG.CPP
- #define FR_DOWN 0x00000001
- #define FR_WHOLEWORD 0x00000002
- #define FR_MATCHCASE 0x00000004
- #define FR_FINDNEXT 0x00000008
- #define FR_REPLACE 0x00000010
- #define FR_REPLACEALL 0x00000020
- #define FR_DIALOGTERM 0x00000040
- #define FR_SHOWHELP 0x00000080
- #define FR_ENABLEHOOK 0x00000100
- #define FR_ENABLETEMPLATE 0x00000200
- #define FR_NOUPDOWN 0x00000400
- #define FR_NOMATCHCASE 0x00000800
- #define FR_NOWHOLEWORD 0x00001000
- #define FR_ENABLETEMPLATEHANDLE 0x00002000
- #define FR_HIDEUPDOWN 0x00004000
- #define FR_HIDEMATCHCASE 0x00008000
- #define FR_HIDEWHOLEWORD 0x00010000
- typedef UINT (APIENTRY *LPFRHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
- typedef struct tagFINDREPLACEW
- {
- DWORD lStructSize; // size of this struct 0x20
- HWND hwndOwner; // handle to owner's window
- HINSTANCE hInstance; // instance handle of.EXE that
- // contains cust. dlg. template
- DWORD Flags; // one or more of the FR_??
- LPWSTR lpstrFindWhat; // ptr. to search string
- LPWSTR lpstrReplaceWith; // ptr. to replace string
- WORD wFindWhatLen; // size of find buffer
- WORD wReplaceWithLen; // size of replace buffer
- LPARAM lCustData; // data passed to hook fn.
- LPFRHOOKPROC lpfnHook; // ptr. to hook fn. or NULL
- LPCWSTR lpTemplateName; // custom template name
- } FINDREPLACE, *LPFINDREPLACE;
- HWND wce_FindText(LPFINDREPLACE lpfr);
- HWND wce_ReplaceText(LPFINDREPLACE lpfr);
-
- // WCEOLE.CPP
- void wce_ReleaseStgMedium(LPSTGMEDIUM lpstgMedium);
- void wce_OleUninitialize();
- SCODE wce_OleInitialize(LPVOID pvReserved);
- HRESULT wce_CoDisconnectObject(IUnknown*, unsigned long);
- HRESULT wce_CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM* ppstm);
- HRESULT wce_OleLoadFromStream (LPSTREAM pStm, REFIID iidInterface, LPVOID FAR* ppvObj);
- HRESULT wce_OleSaveToStream(LPPERSISTSTREAM pPStm, LPSTREAM pStm);
- HRESULT wce_CLSIDFromProgID(LPCOLESTR, LPCLSID);
- void wce_UnregisterOleWindowClasses();
- LPVOID wce_CoTaskMemRealloc(LPVOID pv, ULONG cbOld, ULONG cb);
- HRESULT wce_OleTranslateColor(OLE_COLOR clr, HPALETTE hpal, COLORREF* lpcolorref);
- HRESULT wce_OleCreateFontIndirect(void* lpFontDesc, REFIID riid, LPVOID* lplpvObj);
- UINT WINAPI CoTaskMemSize(LPVOID);
- LRESULT CALLBACK wce_IMMWndProc(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam);
-
-
- // WinCE: Obsolete workaround from MFCCE 2.0
- void inline ATLConnectSinks(CWnd *pCtrl)
- {
- }
-
- // There is no new.h for WinCE, so we define a placement new here.
- inline void * operator new(size_t, void * ptr)
- {
- return ptr;
- }
-
- #include <wcealt.inl>
-
- #endif // __WCEALT_H__
-
-